const user = require("../controllers/user.controller");
module.exports = app => {
  const router = require("express").Router();


  router.post("/app/login", user.login);
  router.post("/app/register", user.register);
  router.post("/app/update", user.update);
  router.get("/app/getDetail", user.getDetail);



  router.post("/admin/login", user.adminLogin);
  router.get("/admin/getDetail", user.getDetail);
  router.post("/admin/update", user.update);
  router.post("/admin/list", user.list);
  router.get("/admin/delete", user.del);

  app.use('/api/users', router);
};
